﻿using System;
using System.Windows;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Tasks;

namespace OverlakeApp.Views
{
    /// <summary>
    /// A page to view the currently selected calendar event.
    /// </summary>
    public partial class ViewCalendarEventPage : PhoneApplicationPage
    {
        /// <summary>
        /// Initialize the ViewCalendarEventPage
        /// </summary>
        public ViewCalendarEventPage()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            WebBrowserTask wbt = new WebBrowserTask();
            wbt.Uri = new Uri((DataContext as ViewModels.OverlakeViewModel).CurrentCalendarEvent.Link);
            wbt.Show();
        }
    }
}